#!/usr/bin/perl
use strict;
use warnings;
use Authen::Htpasswd;

my ($user, $passwd) = @ARGV;
die "supply username and password at command prompt please\n" if !$user && !$passwd;
my $pwfile = Authen::Htpasswd->new('auth.txt', {encrypt_hash => 'md5'});
$pwfile->add_user($user, $passwd);
